#define ETHERTYPE_BF_FABRIC     0x9000
#define FABRIC_HEADER_TYPE_CPU 5
#define ETHERTYPE_IPV4 0x0800

header ethernet_t ethernet;
header ipv4_t ipv4;
header ndn_t ndn;
metadata ndn_metadata_t ndn_metadata;

parser start {
  return parse_ethernet;
}

parser parse_ethernet {
  extract(ethernet); // Start with the ethernet header
  return ipv4;
}

parser ipv4 {
  extract(ipv4);
  return select(latest.version) { //assume ndn use the version 5
    0x5: ndn;
    default: ingress;
  }
}

parser ndn {
  extract(ndn);
  return ingress;
}




